import request from '@/utils/request'

/**
 * 列表
 * @returns
 */
export function GetListAPI(query) {
  return request({
    url: '/system/raw/list',
    method: 'GET',
    params: query
  })
}

/**
 * 新增
 * @returns
 */
export function AddDataAPI(data) {
  return request({
    url: '/system/raw',
    method: 'POST',
    data
  })
}

/**
 * 修改
 * @returns
 */
export function EditDataAPI(data) {
  return request({
    url: '/system/raw',
    method: 'PUT',
    data
  })
}

/**
 * 查询单条
 * @returns
 */
export function GetViewAPI(data) {
  return request({
    url: '/system/raw/' + data,
    method: 'GET'
  })
}

/**
 * 删除
 * @returns
 */
export function DelDataAPI(data) {
  return request({
    url: '/system/raw/' + data,
    method: 'DELETE'
  })
}

//获取单位下拉
export function getListNotPageAPI(query) {
  return request({
    url: '/system/auxiliaryData/selectUnitList',
    method: 'GET',
    params: query
  })
}

/**
 * 获取辅助属性列表下拉
 * @returns []
 */
export function GetAuxiliarySelsctAPI(query) {
  return request({
    url: '/system/auxiliaryData/selectAuxiliaryDtoList',
    method: 'GET',
    params: query
  })
}

/**
 * 通过模板id查询辅助属性列表
 * @returns []
 */
export function GetAuxiliaryListAPI(data) {
  return request({
    url: '/system/auxiliaryData/getInfoAuxiliary/' + data,
    method: 'GET'
  })
}

/**
 * 冻结
 * @returns
 */
export function editFreezeAPI(data) {
  return request({
    url: '/system/raw/editFreeze/' + data,
    method: 'PUT'
  })
}

/**
 * 解冻
 * @returns
 */
export function editThawAPI(data) {
  return request({
    url: '/system/raw/editThaw/' + data,
    method: 'PUT'
  })
}
